#include <stdio.h>
#include "reader.h"

/*
 * Sample main program for the card reader API that I wrote!
 */
int main( int argc, char *argv[] ) {

  /* Open the port to the reader */
  int fd = get_device_port();
  if ( fd == -1 ) return 1;

  /*Read from the device*/
  read_device_and_print( fd );

  /*Not reached, here for example purposes*/

  /*Close the device port*/
  close_device_port( fd );

  return 0;
}
